|
Node enumeration and retrieval function
|
The following functions are used for enumerating
over nodes.
|
Node
* |
Next (void) const |
|
Returns the next node in the chain. Used to
enumerate the current nodes. See also First().
|
int |
ID (void) const |
|
Returns an ID for the node. The ID is unique
in the whole application life.
|
Node
* |
First (void) |
|
This function will return the first node in
the memory. Used to enumerate all the current nodes. See also
Next().
|
Node
* |
ByID (int iID) |
|
Returns the node with the specified ID, or
zero if such a node does not exists.
|
Node
* |
ByName (const QString
&sClass, const QString &sName) |
|
Search for a node with the name sName. Will
return 0 if the node was not found.
|
Public Member Functions
|
|
Node (const QString
&sName="") |
|
Standard constructor. You can specify the
name of the node which will be used in the user interface. See
Name().
|
virtual |
~Node (void) |
virtual void |
Initialize (void) |
void |
LoadTemplate (const QString
&sFileName="", bool bStartEvent=false) |
|
Use an external XML file to initialize the
attributes.
|
void |
SaveTemplate (const QString
&sFileName="", bool bSaveOnlyVisible=false) |
|
Save current attributes as an XML template.
|
unsigned int |
Version (void) const |
|
Returns the current version of the node.
This number increases when the content of the node changed (when
ContentChanged() called).
|
void |
SetVersion (unsigned int
iVersion) |
|
Sets the current version number for the
node.
|
virtual QString |
Name (const ClassDesc *pClass=0)
const |
|
Returns the name of the node. Can be
overwritten in derived classes.
|
void |
SetName (const QString
&sName) |
|
Sets the name of the node. Has no effect if
Name() is
overwritten in a derived class.
|
void |
Annex (Node *pSource, const QString
&sCategory="") |
|
Relink all the attributes of the source node
to this one.
|
virtual void |
Serialize (Stream &s) |
|
Serializes the node.
|
bool |
IsKindOf (const ClassDesc *pClass)
const |
|
Returns true if this node is derived from
the pClass class.
|
void |
ContentChanged (void)
const |
|
This function must be called if the content
of the node is changed.
|
virtual const mudbox::ClassDesc
* |
RuntimeClass (void) const |
|
These functions are used for working with
node events, such as notifications to changes to an
attribute.
|
virtual void |
OnNodeEvent (const Attribute
&cAttribute, NodeEventType cType) |
|
This function is called if an event occurs
with any of the attributes of the node.
|
virtual void |
OnEvent (const EventGate
&cEvent) |
|
This function is called when a generic event
occurs. See EventGate class.
|
void |
RequestDeferredEvent
(Attribute
&cAttribute) |
|
Request for a deferred event, which will
occur only in the main loop.
|
|
These functions are for working with
attributes.
|
unsigned int |
AttributeCount (void)
const |
|
Returns the number of attributes owned by
the node.
|
Attribute
* |
AttributeByIndex (int iIndex)
const |
|
Returns a specified attribute (or 0 if
iIndex is greater than the number of attributes).
|
Attribute
* |
AttributeByName (const
QString &sName) const |
|
Returns a specified attribute by its name.
Returns 0 if the attribute not found.
|
Attribute
* |
AttributeByID (const QString
&sID) const |
|
Returns a specified attribute by its ID.
Returns 0 if the attribute not found.
|
void |
LogAttributes (void)
const |
|
Write all attributes into the log file.
|
virtual QWidget * |
CreatePropertiesWindow
(QWidget *pParent) |
|
Create a window which displays the
attributes of the node. Can be overriden to provide a custom
interface.
|
Static Public Member Functions
|
const mudbox::ClassDesc
* |
StaticClass (void) |
mudbox::Node
* |
CreateInstances (unsigned int
iCount=1) |
Public Attributes
|
AttributeThisPointer |
m_pThis |
Friends
|
struct |
Attribute |
class |
Stream |
class |
EventGate |
mudbox::Node mudbox::Node mudbox::Node
mudbox::Node mudbox::Node mudbox::Node mudbox::Node mudbox::Node
mudbox::Node mudbox::Node
mudbox::Node mudbox::Node mudbox::Node
mudbox::Node mudbox::Node mudbox::Node mudbox::Node mudbox::Node
mudbox::Node mudbox::Node